package org.example.beetlsql.mutiple.web;

import org.example.beetlsql.mutiple.entity.UserInfo;
import org.example.beetlsql.mutiple.service.Db1Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {
    @Autowired
    Db1Service db1Service;


    @GetMapping("/")
    public UserInfo indexPage(){
        UserInfo userInfo = db1Service.queryUser(1);
		return userInfo;

    }

	@GetMapping("/add")
	public UserInfo addPage(){
		UserInfo userInfo = db1Service.addUser();
		return userInfo;

	}
}
